package factory.bean;

import java.math.BigDecimal;

public class Car extends Vehicle {

    private BigDecimal price;

    private String carName;

    public Car(BigDecimal price, String carName) {
        this.price = price;
        this.carName = carName;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getCarName() {
        return carName;
    }

    public void setCarName(String carName) {
        this.carName = carName;
    }

    @Override
    public void showInfo() {
        System.out.println("车辆名称为:" + carName + ", 今日补贴价格为:" + price + "元");
    }
}
